package com.tkp.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Locale;

/**
 * @Author: duk
 * @Date: 2021/11/18 20:44
 * @Description: MVC扩展配置 需要实现WebMvcConfigurer
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {
    @Bean
    public MyViewResolver myViewResolver(){
        return new MyViewResolver();
    }

}

class MyViewResolver implements ViewResolver{

    @Override
    public View resolveViewName(String viewName, Locale locale) throws Exception {
        return null;
    }
}
